#ifndef ARCHIVE_ARCHIVEANDDIRECTLOADER
#define ARCHIVE_ARCHIVEANDDIRECTLOADER
#include <boost/shared_ptr.hpp>
#include "Archive/ILoader.hpp"
#include "Archive/ArchiveLoader.hpp"
#include "Archive/DirectLoad.hpp"
namespace Archive{
class ArchiveAndDirectLoader : public ILoader
{
public:
	ArchiveAndDirectLoader(const char* filename):
	 m_pArchiveLoader(ILoader::createArchiveOnlyLoader(filename))
	{
	}
	virtual IFile::ptr load(const char* filename)
	{
		IFile::ptr file = m_pArchiveLoader->load(filename);
		if(!file)
		{
			file = DirectLoad(filename);
		}
		return file;
	}
private:
	ILoader::ptr m_pArchiveLoader;
};
}//Archive
#endif
